package com.swanclouds.model.managers;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.swanclouds.model.ModelEntity;

/**
 * @author 李文强
 * description
 */

public class OpenH5KVM implements ModelEntity {

    @JsonProperty("UserName")
    private String userName;

    @JsonProperty("PassWord")
    private String passWord;

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getPassWord() {
        return passWord;
    }

    public void setPassWord(String passWord) {
        this.passWord = passWord;
    }

    public static OpenH5KVM builder(){
        return new OpenH5KVM();
    }

   public OpenH5KVM userName(String userName){
        this.userName = userName;
        return this;
   }

   public OpenH5KVM passWord(String passWord){
        this.passWord = passWord;
        return this;
   }

    @Override
    public String toString() {
        ObjectMapper objectMapper = new ObjectMapper();
        try {
            return objectMapper.writeValueAsString(this);
        } catch (JsonProcessingException e) {
        }
        return "OpenH5KVM{" +
                "userName='" + userName + '\'' +
                ", passWord='" + passWord + '\'' +
                '}';
    }
}
